package com.guangaiboen.attendance.db.service;

import com.github.pagehelper.PageHelper;
import com.guangaiboen.attendance.db.constants.AttendanceConstants;
import com.guangaiboen.attendance.db.dao.AttendanceDeptMapper;
import com.guangaiboen.attendance.db.domain.AttendanceDept;
import com.guangaiboen.attendance.db.domain.AttendanceDeptExample;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AttendanceDeptService {
    @Resource
    private AttendanceDeptMapper attendanceDeptMapper;

    //查询所有有效的部门列表
    public List<AttendanceDept> deptList() {
        AttendanceDeptExample example = new AttendanceDeptExample();
        AttendanceDeptExample.Criteria criteria = example.createCriteria();
        criteria.andStatusEqualTo(AttendanceConstants.Valid.YES);
        return attendanceDeptMapper.selectByExample(example);
    }
}
